<?php
namespace app\model;
class Admin extends \think\Model{
    public $table="admin";

    function get_info_by_name($name){
        $o=$this->where(['name'=>$name])->find();
        return object2array($o);
    }
}